package 设计模式.组合模式;

public class Department extends OrganizationComponent{
    //叶子节点，不会有集合
//    List<OrganizationComponent> organizationComponentList = new ArrayList<>();
    public Department(String name, String des) {
        super(name, des);
    }

    @Override
    public String getName() {
        return super.getName();
    }

    //add,remove就不用写了，因为他是叶子节点
    @Override
    protected void print() {
        System.out.println(getName());
    }
}
